#include <REGX52.H>
#include "Delay.h"

sbit LED=P2^7; //异或

void Delay1(unsigned int i){
	unsigned int k=i;
	while(i--);
	while(k--);
}

void main(void){
	unsigned char Time, i;
	while(1) {
		for(Time=0;Time<100;Time++){
			for(i=0;i<20;i++){
				LED=0;
				Delay1(Time);
				LED=1;
				Delay1(100-Time);
			}
		}
		for(Time=100;Time>0;Time--){
			for(i=0;i<20;i++){
				LED=0;
				Delay1(Time);
				LED=1;
				Delay1(100-Time);
			}
		}
	}
}